﻿using System;
using Devv.Core.Crypto;

namespace Devv.Threeter
{
	static class SecurityManager
	{
		#region Encrypt

		internal static String Encrypt(String value)
		{
			return Cipher.AESEncrypt(value, false);
		}

		#endregion

		#region Decrypt

		internal static String Decrypt(String value)
		{
			try
			{
				if (String.IsNullOrEmpty(value))
				{
					return String.Empty;
				}
				return Cipher.AESDecrypt(value, false);
			}
			catch
			{
				return String.Empty;
			}
		}

		#endregion
	}
}
